<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改class类名</title>
</head>
<body>
    <!-- 7. `<div class="erweima hide" id="er">`，
        将class的属性值中的hide更换为show，
        其他保持不变，请写出适合的方法。 -->
        <div class="erweima hide" id="er">
            修改class类名
        </div>

</body>
<script>
    var ele = document.getElementBYId("er");
    ele.className = ele.className.replace('hide', 'show');
</script>
</html>